
package fileby.util.plugins;

import fileby.plugins.IPluggable;
import fileby.plugins.IToolbox;

/**
 *
 * @author Ludwig Kjellstrom
 */
public class Plugin implements IPluggable {

    private String name = "Plugin";
    private String description = "N/A";
    private IPluggable plugin;

    public Plugin(String name, String description, IPluggable plugin) {
        if (name != null) {
            this.name = name;
        }
        if (description != null) {
            this.description = description;
        }
        this.plugin = plugin;
    }

    public String getDescription() {
        return description;
    }

    public String getName() {
        return name;
    }

    public boolean run(IToolbox toolBox) {
        return plugin.run(toolBox);
    }

}
